package it.mauriziulu.android.ehttpexecutors.entity;

import it.mauriziulu.android.ehttpexecutors.ContentParser;

import java.io.Serializable;

public class CacheEntry implements Serializable {

	private static final long serialVersionUID = -6292206257001713902L;

	private String rawContent;

	private Serializable strucuredContent;

	public CacheEntry(String content, ContentParser parser) {
		rawContent = content;
		if (parser != null) {
			strucuredContent = parser.parse(content);
		}
	}

	public CacheEntry(String content, Serializable structContent) {
		rawContent = content;
		strucuredContent = structContent;
	}

	public String getRawContent() {
		return rawContent;
	}

	public void setRawContent(String rawContent) {
		this.rawContent = rawContent;
	}

	public Serializable getStrucuredContent() {
		return strucuredContent;
	}

	public void setStrucuredContent(Serializable strucuredContent) {
		this.strucuredContent = strucuredContent;
	}

}
